import axios from '../axios'

/* 
 * 数据管理
 */

// 商品数据搜索
export const commodityFuzzySearch = (data) => {
    return axios({
        url: '/kysj/search/commodityFuzzySearch',
        method: 'post',
        data
    })
}

// 装备经济性数据搜索
export const economyFuzzySearch = (data) => {
    return axios({
        url: '/kysj/search/economyFuzzySearch',
        method: 'post',
        data
    })
}

//  导出 商品
export const commodityDownload = (typeName) => {
    return axios({
        url: '/kysj/search/commodityFuzzySearchDownload?searchWord='+typeName,
        method: 'get',
        responseType: 'blob',
    })
}

//  导出 装备经济
export const economyDownload = (typeName) => {
    return axios({
        url: '/kysj/search/economyFuzzySearchDownload?searchWord='+typeName,
        method: 'get',
        responseType: 'blob',
    })
}

// 美国国防部 导航列表 
export const defenseSearch = () => {
    return axios({
        url: '/kysj/search/defenseSearch',
        method: 'get',
    })
}

//  搜索 美国国防部数据
export const economyDefenseSearch = (data) => {
    return axios({
        url: 'kysj/search/economyDefenseSearch',
        method: 'post',
        data
    })
} 

//  导出 美国国防部数据
export const defenseDownload = (organization,typeName) => {
    return axios({
        url: '/kysj/search/economyDefenseSearchDownload?organization='+organization+'&searchWord='+typeName,
        method: 'get',
        responseType: 'blob',
    })
}